package com.climaxi.core.helper;

import android.app.Activity;
import android.content.Context;
import android.telephony.TelephonyManager;

public class UI {

	public static String getMyPhoneNumber(Activity activity)
	{
	    
	    TelephonyManager phoneManager = (TelephonyManager) activity.getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
	    String phoneNumber = phoneManager.getLine1Number();
	    String getSimSerialNumber = phoneManager.getSimSerialNumber();
	    phoneManager.getDeviceId();
	    
	    return phoneNumber;
    }

	public static String getMy10DigitPhoneNumber(Activity activity)
	{
            String s = UI.getMyPhoneNumber(activity);
            if(s.length() >= 2)
            	return s.substring(2);
            else
            	return s;
    }
}
